package com.ndp.fb.walle.business;

import com.ndp.fb.exception.BusinessException;
import com.ndp.fb.model.business.vo.cache.result.PublishCache;

import java.util.concurrent.TimeUnit;

/**
 * Created by Administrator on 2014/10/23.
 */
public interface CacheService<T> {

    void cache(String key, PublishCache cache, long timeout, TimeUnit unit) throws BusinessException;

     void update(String key, PublishCache cache) throws BusinessException;

     PublishCache fetch(String key) throws BusinessException;

     void delete(String key, PublishCache cache);

     Object fetchObject(String key) throws BusinessException;


}
